import request from '@/utils/request'

// 订单管理列表
export const getOrder = (data) => {
  return request({
    method: 'post',
    url: '/order-manager/order/page',
    data
  })
}
// 订单详情
export const getOrderDetail = (id) => {
  return request({
    method: 'get',
    url: '/order-manager/order/' + id,
    params: {
      0: id
    }
  })
}
// 货品信息
export const getOrderCargo = (orderId) => {
  return request({
    method: 'get',
    url: '/order-manager/cargo',
    params: {
      orderId
    }
  })
}
// 获取货品类型
export const getGoodsType = () => {
  return request({
    method: 'get',
    url: '/goodsType/simple'
  })
}
// 编辑货品信息
export const editGoodsType = (data) => {
  return request({
    method: 'put',
    url: '/order-manager/cargo/' + data.id,
    data
  })
}
// 运单管理列表
export const getTransportOrder = (data) => {
  return request({
    method: 'post',
    url: '/transport-order-manager/page',
    data
  })
}
// 运输状态统计
export const getStatusCount = () => {
  return request({
    method: 'get',
    url: '/transport-order-manager/count'
  })
}
// 获取运单详情
export const getTransportOrderDetail = (id) => {
  return request({
    method: 'get',
    url: '/transport-order-manager/' + id,
    params: {
      0: id
    }
  })
}
